<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <link rel="shortcut icon" href="../public/favicon.ico" th:href="@{/favicon.ico}"/>

    <title>注册 . MyOIDC</title>

    <th:block th:include="fragment/header :: public-css"/>
</head>
<body>

<div class="container" style="margin-top: 5%;">
    <div class="col-md-offset-2 col-md-8">
        <div class="panel panel-default">
            <div class="panel-body">
                <a th:href="@{'/'}"><img alt="Logo" th:src="@{/images/openid.png}"
                                         style="max-height: 100px;"/></a>

                <p class="text-muted">请填写注册信息</p>
                <form class="form-horizontal" th:action="@{''}" method="post" th:object="${formDto}">
                    <input type="hidden" th:field="*{useScene}" name="useScene"/>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">应用名称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="请输入应用名称" th:field="*{appName}"
                                   required="required" maxlength="20"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">Redirect Uri</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="https://..."
                                   th:field="*{webServerRedirectUri}"
                                   required="required" maxlength="255"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-10">
                            <p th:if="${#fields.hasAnyErrors()}" th:text="${#fields.errors()}"
                               class="alert alert-warning"></p>
                        </div>
                    </div>


                    <div class="form-group">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-10">
                            <button type="submit" class="btn btn-success">提交注册</button>
                            <a href="registration">返回</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div th:replace="fragment/footer :: footer-oidc"/>
    </div>
</div>


</body>
</html>